package org.neptune.web.controller.aop;

import org.neptune.common.response.ResponseBean;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

/**
 * @author lwl
 * @date 2019/7/16 11:17
 */
@RestControllerAdvice
public class CommonController {

	@ExceptionHandler
	public ResponseBean globalExceptionHandler(Exception e) {

		return ResponseBean.fail(null, e.getMessage());
	}

}
